[arch-releng] [RFC] [PATCH] [syslinux-iso] Workaround download-repo.sh, remove extra gcc pkgs
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> --- configs/syslinux-iso/download-repo.sh | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/configs/syslinux-iso/download-repo.sh b/configs/syslinux-iso/download-repo.sh index 255304e..78ce531 100755 --- a/configs/syslinux-iso/download-repo.sh +++ b/configs/syslinux-iso/download-repo.sh @@ -38,7 +38,8 @@ fi /usr/bin/pacman -Sy #Ensure we have core/pkgname format, so we don't get crap from other repos -PKGS=$(/usr/bin/pacman -Sl $REPO | cut -d' ' -f1,2 | tr ' ' '/') +#Workaround remove gcc-add gcc-fortran gcc-go gcc-objc from [core] +PKGS=$(/usr/bin/pacman -Sl $REPO | grep -v "gcc-\(a\|f\|g\|o\)" | cut -d' ' -f1,2 | tr ' ' '/') if [ -n "$PKGS" ]; then baseurl="" @@ -58,7 +59,13 @@ if [ -n "$PKGS" ]; then fi done if [ "$REPO_CHANGED" = "y" ]; then - wget -nv "$baseurl/$REPO.db" -O "$DEST/$REPO.db" + # wget -nv "$baseurl/$REPO.db" -O "$DEST/$REPO.db" + #[workaround] remove gcc-add gcc-fortran gcc-go gcc-objc from [core] + wget -nv "$baseurl/$REPO.db.tar.gz" -O "$DEST/$REPO.db.tar.gz" + repo-remove "$DEST/$REPO.db.tar.gz" gcc-ada gcc-fortran gcc-go gcc-objc + mv "$DEST/$REPO.db.tar.gz" "$DEST/$REPO.db" + rm "$DEST/$REPO.db.tar.gz.old" + #[/workaround] fi else echo "No packages to download... what'd you break?" -- 1.7.5.1
On Mon, 16 May 2011 12:57:28 -0300 Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> wrote:
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> --- configs/syslinux-iso/download-repo.sh | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/configs/syslinux-iso/download-repo.sh b/configs/syslinux-iso/download-repo.sh index 255304e..78ce531 100755 --- a/configs/syslinux-iso/download-repo.sh +++ b/configs/syslinux-iso/download-repo.sh @@ -38,7 +38,8 @@ fi /usr/bin/pacman -Sy
#Ensure we have core/pkgname format, so we don't get crap from other repos -PKGS=$(/usr/bin/pacman -Sl $REPO | cut -d' ' -f1,2 | tr ' ' '/') +#Workaround remove gcc-add gcc-fortran gcc-go gcc-objc from [core] it's gcc-ada, not gcc-add. maybe also explain _why_ the workaround is needed.
+PKGS=$(/usr/bin/pacman -Sl $REPO | grep -v "gcc-\(a\|f\|g\|o\)" | cut -d' ' -f1,2 | tr ' ' '/') i would list them explicitly, that's more clear and more robust
if [ -n "$PKGS" ]; then baseurl="" @@ -58,7 +59,13 @@ if [ -n "$PKGS" ]; then fi done if [ "$REPO_CHANGED" = "y" ]; then - wget -nv "$baseurl/$REPO.db" -O "$DEST/$REPO.db" + # wget -nv "$baseurl/$REPO.db" -O "$DEST/$REPO.db" + #[workaround] remove gcc-add gcc-fortran gcc-go gcc-objc from [core]
gcc-ada. also, why leave the commented entry?
+ wget -nv "$baseurl/$REPO.db.tar.gz" -O "$DEST/$REPO.db.tar.gz" + repo-remove "$DEST/$REPO.db.tar.gz" gcc-ada gcc-fortran gcc-go gcc-objc + mv "$DEST/$REPO.db.tar.gz" "$DEST/$REPO.db" + rm "$DEST/$REPO.db.tar.gz.old" + #[/workaround] fi else echo "No packages to download... what'd you break?"
On 05/16/2011 04:59 PM, Dieter Plaetinck wrote:
On Mon, 16 May 2011 12:57:28 -0300 Gerardo Exequiel Pozzi<vmlinuz386@yahoo.com.ar> wrote:
Signed-off-by: Gerardo Exequiel Pozzi<vmlinuz386@yahoo.com.ar> --- configs/syslinux-iso/download-repo.sh | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/configs/syslinux-iso/download-repo.sh b/configs/syslinux-iso/download-repo.sh index 255304e..78ce531 100755 --- a/configs/syslinux-iso/download-repo.sh +++ b/configs/syslinux-iso/download-repo.sh @@ -38,7 +38,8 @@ fi /usr/bin/pacman -Sy
#Ensure we have core/pkgname format, so we don't get crap from other repos -PKGS=$(/usr/bin/pacman -Sl $REPO | cut -d' ' -f1,2 | tr ' ' '/') +#Workaround remove gcc-add gcc-fortran gcc-go gcc-objc from [core] it's gcc-ada, not gcc-add. maybe also explain _why_ the workaround is needed. brb!!! typo again!. +PKGS=$(/usr/bin/pacman -Sl $REPO | grep -v "gcc-\(a\|f\|g\|o\)" | cut -d' ' -f1,2 | tr ' ' '/') i would list them explicitly, that's more clear and more robust
if [ -n "$PKGS" ]; then baseurl="" @@ -58,7 +59,13 @@ if [ -n "$PKGS" ]; then fi done if [ "$REPO_CHANGED" = "y" ]; then - wget -nv "$baseurl/$REPO.db" -O "$DEST/$REPO.db" + # wget -nv "$baseurl/$REPO.db" -O "$DEST/$REPO.db" + #[workaround] remove gcc-add gcc-fortran gcc-go gcc-objc from [core] gcc-ada. also, why leave the commented entry? wget comment? when workaround will be not needed, should be uncomented again. + wget -nv "$baseurl/$REPO.db.tar.gz" -O "$DEST/$REPO.db.tar.gz" + repo-remove "$DEST/$REPO.db.tar.gz" gcc-ada gcc-fortran gcc-go gcc-objc + mv "$DEST/$REPO.db.tar.gz" "$DEST/$REPO.db" + rm "$DEST/$REPO.db.tar.gz.old" + #[/workaround] fi else echo "No packages to download... what'd you break?"
Thanks for the feedback. So do you finally agree with this? -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
On Mon, May 16, 2011 at 4:55 PM, Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> wrote:
On 05/16/2011 04:59 PM, Dieter Plaetinck wrote:
On Mon, 16 May 2011 12:57:28 -0300 Gerardo Exequiel Pozzi<vmlinuz386@yahoo.com.ar> wrote:
Signed-off-by: Gerardo Exequiel Pozzi<vmlinuz386@yahoo.com.ar> --- configs/syslinux-iso/download-repo.sh | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/configs/syslinux-iso/download-repo.sh b/configs/syslinux-iso/download-repo.sh index 255304e..78ce531 100755 --- a/configs/syslinux-iso/download-repo.sh +++ b/configs/syslinux-iso/download-repo.sh @@ -38,7 +38,8 @@ fi /usr/bin/pacman -Sy
#Ensure we have core/pkgname format, so we don't get crap from other repos -PKGS=$(/usr/bin/pacman -Sl $REPO | cut -d' ' -f1,2 | tr ' ' '/') +#Workaround remove gcc-add gcc-fortran gcc-go gcc-objc from [core]
it's gcc-ada, not gcc-add. maybe also explain _why_ the workaround is needed.
brb!!! typo again!.
+PKGS=$(/usr/bin/pacman -Sl $REPO | grep -v "gcc-\(a\|f\|g\|o\)" | cut -d' ' -f1,2 | tr ' ' '/')
i would list them explicitly, that's more clear and more robust I would also not list them twice in this script.
With that said, you've taken a totally job-agnostic script and hacked it to death for only [core], and it will do really silly things when maybe someone does want to download a full repo without exceptions. Why aren't you doing this in a more sane fashion outside of the script itself? I know this is going to be a bit of a hack wherever it ends up, but this is the wrong place to do it. dmcgee@galway ~/projects/archiso/configs/syslinux-iso (master) $ grep 'core' download-repo.sh | wc -l 0
if [ -n "$PKGS" ]; then baseurl="" @@ -58,7 +59,13 @@ if [ -n "$PKGS" ]; then fi done if [ "$REPO_CHANGED" = "y" ]; then - wget -nv "$baseurl/$REPO.db" -O "$DEST/$REPO.db" + # wget -nv "$baseurl/$REPO.db" -O "$DEST/$REPO.db" + #[workaround] remove gcc-add gcc-fortran gcc-go gcc-objc from [core]
gcc-ada. also, why leave the commented entry?
wget comment? when workaround will be not needed, should be uncomented again.
+ wget -nv "$baseurl/$REPO.db.tar.gz" -O "$DEST/$REPO.db.tar.gz" + repo-remove "$DEST/$REPO.db.tar.gz" gcc-ada gcc-fortran gcc-go gcc-objc + mv "$DEST/$REPO.db.tar.gz" "$DEST/$REPO.db" + rm "$DEST/$REPO.db.tar.gz.old" + #[/workaround] fi else echo "No packages to download... what'd you break?"
Thanks for the feedback.
So do you finally agree with this?
-- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
On 05/16/2011 07:08 PM, Dan McGee wrote:
On Mon, May 16, 2011 at 4:55 PM, Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> wrote:
On 05/16/2011 04:59 PM, Dieter Plaetinck wrote:
On Mon, 16 May 2011 12:57:28 -0300 Gerardo Exequiel Pozzi<vmlinuz386@yahoo.com.ar> wrote:
Signed-off-by: Gerardo Exequiel Pozzi<vmlinuz386@yahoo.com.ar> --- configs/syslinux-iso/download-repo.sh | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/configs/syslinux-iso/download-repo.sh b/configs/syslinux-iso/download-repo.sh index 255304e..78ce531 100755 --- a/configs/syslinux-iso/download-repo.sh +++ b/configs/syslinux-iso/download-repo.sh @@ -38,7 +38,8 @@ fi /usr/bin/pacman -Sy
#Ensure we have core/pkgname format, so we don't get crap from other repos -PKGS=$(/usr/bin/pacman -Sl $REPO | cut -d' ' -f1,2 | tr ' ' '/') +#Workaround remove gcc-add gcc-fortran gcc-go gcc-objc from [core] it's gcc-ada, not gcc-add. maybe also explain _why_ the workaround is needed. brb!!! typo again!. +PKGS=$(/usr/bin/pacman -Sl $REPO | grep -v "gcc-\(a\|f\|g\|o\)" | cut -d' ' -f1,2 | tr ' ' '/') i would list them explicitly, that's more clear and more robust I would also not list them twice in this script.
With that said, you've taken a totally job-agnostic script and hacked it to death for only [core], and it will do really silly things when maybe someone does want to download a full repo without exceptions. Why aren't you doing this in a more sane fashion outside of the script itself? I know this is going to be a bit of a hack wherever it ends up, but this is the wrong place to do it.
dmcgee@galway ~/projects/archiso/configs/syslinux-iso (master) $ grep 'core' download-repo.sh | wc -l 0
Yes, this is really bad. Maybe a newer script just for core-workaround ?
if [ -n "$PKGS" ]; then baseurl="" @@ -58,7 +59,13 @@ if [ -n "$PKGS" ]; then fi done if [ "$REPO_CHANGED" = "y" ]; then - wget -nv "$baseurl/$REPO.db" -O "$DEST/$REPO.db" + # wget -nv "$baseurl/$REPO.db" -O "$DEST/$REPO.db" + #[workaround] remove gcc-add gcc-fortran gcc-go gcc-objc from [core] gcc-ada. also, why leave the commented entry? wget comment? when workaround will be not needed, should be uncomented again. + wget -nv "$baseurl/$REPO.db.tar.gz" -O "$DEST/$REPO.db.tar.gz" + repo-remove "$DEST/$REPO.db.tar.gz" gcc-ada gcc-fortran gcc-go gcc-objc + mv "$DEST/$REPO.db.tar.gz" "$DEST/$REPO.db" + rm "$DEST/$REPO.db.tar.gz.old" + #[/workaround] fi else echo "No packages to download... what'd you break?" Thanks for the feedback.
So do you finally agree with this?
-- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
-- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
On Mon, May 16, 2011 at 5:17 PM, Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> wrote:
On 05/16/2011 07:08 PM, Dan McGee wrote:
With that said, you've taken a totally job-agnostic script and hacked it to death for only [core], and it will do really silly things when maybe someone does want to download a full repo without exceptions. Why aren't you doing this in a more sane fashion outside of the script itself? I know this is going to be a bit of a hack wherever it ends up, but this is the wrong place to do it.
dmcgee@galway ~/projects/archiso/configs/syslinux-iso (master) $ grep 'core' download-repo.sh | wc -l 0
Yes, this is really bad.
Maybe a newer script just for core-workaround ?
I was thinking something a bit simpler. * Get the package names using `pacman -Slq $REPO` and drop the cut/tr B.S. at this level. Convert it to a bash array. * Command line takes an exclude list, or file, or something. Parse this into a bash array of package names, should be pretty straightforward. * Loop the pacman provided list of packages; if any value is present in the blacklist, drop it. * Proceed as we do now; when looping ^^ prepend "$REPO/" to each, and use this list for download. Obviously this isn't trivial, but it shouldn't be more than 20 lines or so. However, it makes it a lot easier to blacklist, unblacklist, and track said changes using version control once it is in place. -Dan
On 05/16/2011 07:21 PM, Dan McGee wrote: > On Mon, May 16, 2011 at 5:17 PM, Gerardo Exequiel Pozzi > <vmlinuz386@yahoo.com.ar> wrote: >> On 05/16/2011 07:08 PM, Dan McGee wrote: >>> With that said, you've taken a totally job-agnostic script and hacked >>> it to death for only [core], and it will do really silly things when >>> maybe someone does want to download a full repo without exceptions. >>> Why aren't you doing this in a more sane fashion outside of the script >>> itself? I know this is going to be a bit of a hack wherever it ends >>> up, but this is the wrong place to do it. >>> >>> dmcgee@galway ~/projects/archiso/configs/syslinux-iso (master) >>> $ grep 'core' download-repo.sh | wc -l >>> 0 >>> >> Yes, this is really bad. >> >> Maybe a newer script just for core-workaround ? > I was thinking something a bit simpler. > * Get the package names using `pacman -Slq $REPO` and drop the cut/tr > B.S. at this level. Convert it to a bash array. > * Command line takes an exclude list, or file, or something. Parse > this into a bash array of package names, should be pretty > straightforward. > * Loop the pacman provided list of packages; if any value is present > in the blacklist, drop it. > * Proceed as we do now; when looping ^^ prepend "$REPO/" to each, and > use this list for download. > > Obviously this isn't trivial, but it shouldn't be more than 20 lines > or so. However, it makes it a lot easier to blacklist, unblacklist, > and track said changes using version control once it is in place. > > -Dan > Yes, much better, I will see can I do... -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
On Mon, 16 May 2011 23:52:17 -0300 Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> wrote: > On 05/16/2011 07:21 PM, Dan McGee wrote: > > On Mon, May 16, 2011 at 5:17 PM, Gerardo Exequiel Pozzi > > <vmlinuz386@yahoo.com.ar> wrote: > >> On 05/16/2011 07:08 PM, Dan McGee wrote: > >>> With that said, you've taken a totally job-agnostic script and > >>> hacked it to death for only [core], and it will do really silly > >>> things when maybe someone does want to download a full repo > >>> without exceptions. Why aren't you doing this in a more sane > >>> fashion outside of the script itself? I know this is going to be > >>> a bit of a hack wherever it ends up, but this is the wrong place > >>> to do it. > >>> > >>> dmcgee@galway ~/projects/archiso/configs/syslinux-iso (master) > >>> $ grep 'core' download-repo.sh | wc -l > >>> 0 > >>> > >> Yes, this is really bad. > >> > >> Maybe a newer script just for core-workaround ? > > I was thinking something a bit simpler. > > * Get the package names using `pacman -Slq $REPO` and drop the > > cut/tr B.S. at this level. Convert it to a bash array. > > * Command line takes an exclude list, or file, or something. Parse > > this into a bash array of package names, should be pretty > > straightforward. > > * Loop the pacman provided list of packages; if any value is present > > in the blacklist, drop it. > > * Proceed as we do now; when looping ^^ prepend "$REPO/" to each, > > and use this list for download. > > > > Obviously this isn't trivial, but it shouldn't be more than 20 lines > > or so. However, it makes it a lot easier to blacklist, unblacklist, > > and track said changes using version control once it is in place. > > > > -Dan > > > Yes, much better, I will see can I do... > +1 on that. properly implemented blacklisting will allow us to control us many more exceptions. not only as a workaround for these "they don't belong in core anyway" packages, but also for packages that do belong in core, but we strip out anyway to arrive at a size < 700MB. we'll just need to update some documentation here and there to mention the core images no longer include an exact copy of the core repository. Dieter
participants (3)
-
Dan McGee
-
Dieter Plaetinck
-
Gerardo Exequiel Pozzi