Merge lp://qastaging/~emanuele-aina/linaro-image-tools/fix-apt-source-dup-detect into lp://qastaging/linaro-image-tools/11.11

Proposed by Emanuele Aina
Status: Merged
Merged at revision: 534
Proposed branch: lp://qastaging/~emanuele-aina/linaro-image-tools/fix-apt-source-dup-detect
Merge into: lp://qastaging/linaro-image-tools/11.11
Diff against target: 11 lines (+1/-1)
1 file modified
linaro-hwpack-install (+1/-1)
To merge this branch: bzr merge lp://qastaging/~emanuele-aina/linaro-image-tools/fix-apt-source-dup-detect
Reviewer Review Type Date Requested Status
Loïc Minier (community) Approve
Review via email: mp+113556@code.qastaging.launchpad.net

Description of the change

Fixes bug #1018941 (APT source duplicates detection fails if there are no files in /etc/apt/sources.list.d/) and bug #687608 (grep in /etc/apt/sources.list.d is over broad)

To post a comment you must log in.
Revision history for this message
Loïc Minier (lool) wrote :

On Thu, Jul 05, 2012, Emanuele Aina wrote:
> - grep -qF "$line" /etc/apt/sources.list.d/* /etc/apt/sources.list \
> + grep -qF "$line" $(sh -sc "echo /etc/apt/sources.list.d/*.list") /etc/apt/sources.list \

Not sure why the -s flag to sh, but there is at least one superfluous
fork here: subshell + running sh.

Perhaps simply:
  grep -qF "$line" $(find /etc/apt/sources.list.d/ -name \*.list) \
      /etc/apt/sources.list

--
Loïc Minier

534. By Emanuele Aina

Fix duplicates detection on missing sources.list.d entries

APT source duplicates detection fails if there are no files in
/etc/apt/sources.list.d/ due to glob expansion failing
(LP: #1018941).
Glob expansion is also restricted to *.list files (LP: #687608).

Revision history for this message
Emanuele Aina (emanuele-aina) wrote :

Loïc Minier wrote:

> Not sure why the -s flag to sh, but there is at least one superfluous
> fork here: subshell + running sh.
>
> Perhaps simply:
> grep -qF "$line" $(find /etc/apt/sources.list.d/ -name \*.list) \
> /etc/apt/sources.list

Mh, I thought that the -s flag was the equivalent of "shopt -s nullglob"
but now I don't know where that idea came from.

I've updated the branch, sorry for the confusion.

--
Emanuele

Revision history for this message
Loïc Minier (lool) wrote :

Looks good; thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches