2009/7/11 Praveen A <prav...@gmail.com>: > I tried to use the backports repo as a local repo but it did not > include openoffice from backports. I could see other packages like > postgres server and client from backport in the cd image. > > backports currently have openoffice 3.0 for i386, but cd still has > 2.4. I assumed debian cd would pick the latest version. Is it using > apt for dependency resolution or some other method specific to > debian-cd?
I was trying to do a shortcut and some mismatch made this to fail (LOCAL expect the section to be local, but backports have main as section). > Some hints as to what needs to be done would be helpful. Tried to make some changes to debian-cd for adding backport support, but it is still taking OpenOffice 2.4 only ! debian-cd patch is attached. I probably missed some changes, hope someone here can help me find it. - Praveen -- പ്രവീണ് അരിമ്പ്രത്തൊടിയില് <GPLv2> I know my rights; I want my phone call! <DRM> What use is a phone call, if you are unable to speak? (as seen on /.) Join The DRM Elimination Crew Now! http://fci.wikia.com/wiki/Anti-DRM-Campaign
Index: tools/update_tasks =================================================================== --- tools/update_tasks (revision 1924) +++ tools/update_tasks (working copy) @@ -164,6 +164,14 @@ fi fi +if [ -n "$BACKPORTS" ] ; then + if [ -n "$BACKPORTDEBS" ] ; then + zcat $BACKPORTDEBS/dists/${CODENAME}-backports/main/binary-$arch/Packages.gz >> $TMP_PKG + else + zcat $MIRROR/dists/${CODENAME}-backports/main/binary-$arch/Packages.gz >> $TMP_PKG + fi +fi + # Now grab the appropriate tasksel package TASKSEL_DEB=$MIRROR/`mawk ' /^Package: tasksel-data$/ { found=1 } Index: tools/make_disc_trees.pl =================================================================== --- tools/make_disc_trees.pl (revision 1924) +++ tools/make_disc_trees.pl (working copy) @@ -32,6 +32,7 @@ my $security = $ENV{'SECURITY'} || $mirror; my $localdebs = $ENV{'LOCALDEBS'} || $mirror; +my $backportdebs = $ENV{'BACKPORTDEBS'} || $mirror; my $iso_blksize = 2048; my $log_opened = 0; my $old_split = $/; @@ -401,6 +402,7 @@ } close PLIST; + $packages_file = "$cddir/dists/$codename/local/binary-$arch/Packages"; if (open (PLIST, $packages_file)) { while (defined($p = <PLIST>)) { @@ -410,6 +412,15 @@ close PLIST; } + $packages_file = "$cddir/dists/${codename}-backports/main/binary-$arch/Packages"; + if (open (PLIST, $packages_file)) { + while (defined($p = <PLIST>)) { + chomp $p; + $p =~ m/^Package: (\S+)/ and $on_disc{$1} = $1; + } + close PLIST; + } + if (defined($ENV{'BASE_EXCLUDE'})) { open (ELIST, $ENV{'BASE_EXCLUDE'}) || die "Can't open base_exclude file $ENV{'BASE_EXCLUDE'} : $!\n"; @@ -1027,7 +1038,13 @@ if (-e "$localdebs/$file") { $source = $localdebs; } else { - die "$file not found under either $source or $localdebs\n"; + msg_ap(0, "Can't find $file in the main archive or local, trying backports\n"); + if(-e "$backportdebs/$file") { + $source = $backportdebs; + } else { + + die "$file not found under $source or $localdebs or$backportdebs \n"; + } } } $realfile = real_file ("$source/$file"); @@ -1049,7 +1066,12 @@ if (-e "$localdebs/$file") { $source = $localdebs; } else { - die "$file not found under either $source or $localdebs\n"; + msg_ap(0, "Can't find $file in the main archive or local, trying backports\n"); + if(-e "$backportdebs/$file") { + $source = $backportdebs; + } else { + die "$file not found under $source or $localdebs or $backportdebs\n"; + } } } $realfile = real_file ("$source/$file"); Index: tools/scanpackages.old =================================================================== --- tools/scanpackages.old (revision 1924) +++ tools/scanpackages.old (working copy) @@ -143,9 +143,31 @@ done fi +if [ -n "$BACKPORTS" ]; then + if [ -e ${BACKPORTDEBS:-$MIRROR}/dists/${CODENAME}-backports/main/binary-$ARCH/Release ]; then + cp ${BACKPORTDEBS:-$MIRROR}/dists/${CODENAME}-backports/main/binary-$ARCH/Release \ + dists/${CODENAME}-backports/main/binary-$ARCH/ + fi + grep -v ^X-Medium $PREFIX.Packages-main \ + >dists/${CODENAME}-backports/main/binary-$ARCH/Packages + grep -v ^X-Medium $PREFIX.Packages-main | gzip --best \ + >dists/${CODENAME}-backports/main/binary-$ARCH/Packages.gz + for i in $TDIR/${CODENAME}-backports-$ARCH/?.packages; do + dir=${i%%.packages} + n=${dir##$TDIR/$CODENAME-$ARCH/} + if [ $n -le $NUM ]; then + cat $dir.Packages-main \ + >>dists/${CODENAME}-backports/main/binary-$ARCH/Packages.cd + cat $dir.Packages-main | gzip --best \ + >>dists/${CODENAME}-backports/main/binary-$ARCH/Packages.cd.gz + fi + done fi + +fi + # Creates the temp Packages-$SECT files if [ "$1" != "scan" ]; then exit 0; fi @@ -235,4 +257,16 @@ fi fi +if [ -n "$BACKPORTS" ]; then + $DPKG_SCANPACKAGES -m "`cat .disk/info`" -a $ARCH \ + dists/${CODENAME}-backports/main/binary-$ARCH \ + /dev/null > $PREFIX.Packages-main + + if [ -d pool/main ] + then + $DPKG_SCANPACKAGES -m "`cat .disk/info`" -a $ARCH \ + pool/main /dev/null >> $PREFIX.Packages-main + fi +fi + exit 0 Index: tools/sort_deps =================================================================== --- tools/sort_deps (revision 1924) +++ tools/sort_deps (working copy) @@ -19,6 +19,7 @@ my $nonfree = $ENV{'NONFREE'} || 0; my $extranonfree = $ENV{'EXTRANONFREE'} || 0; my $local = $ENV{'LOCAL'} || 0; +my $backports = $ENV{'BACKPORTS'} || 0; my $complete = $ENV{'COMPLETE'} || 0; my $norecommends = $ENV{'NORECOMMENDS'} || 0; my $nosuggests = $ENV{'NOSUGGESTS'} || 1; Index: tools/apt-selection =================================================================== --- tools/apt-selection (revision 1924) +++ tools/apt-selection (working copy) @@ -72,6 +72,12 @@ >> $APTTMP/$CODENAME-$ARCH/apt/sources.list fi + # Backport packages ... + if [ -n "$BACKPORTS" ]; then + echo "$ADEB file:${BACKPORTDEBS:-$MIRROR} ${CODENAME}-backports main" \ + >> $APTTMP/${CODENAME}-backports-$ARCH/apt/sources.list + fi + # Security mirror ... if [ -n "$SECURITY" ]; then echo "$ADEB file:${SECURITY:-$MIRROR} $CODENAME/updates $sections" \ Index: tools/start_new_disc =================================================================== --- tools/start_new_disc (revision 1924) +++ tools/start_new_disc (working copy) @@ -341,6 +341,14 @@ fi fi + if [ -n "$BACKPORTDEBS" -a -n "$BACKPORTS" ] ; then + if [ -e $BACKPORTDEBS/dists/${CODENAME}-backports/main/binary-$ARCH/Release ] ; then + mkdir -p dists/${CODENAME}-backports/main/binary-$ARCH + cp $BACKPORTDEBS/dists/${CODENAME}-backports/main/binary-$ARCH/Release \ + dists/${CODENAME}-backports/main/binary-$ARCH/ + fi + fi + if [ -e "$MIRROR/dists/$DI_CODENAME/main/debian-installer/binary-$ARCH/Release" ] ; then mkdir -p dists/$CODENAME/main/debian-installer/binary-$ARCH cp $MIRROR/dists/$DI_CODENAME/main/debian-installer/binary-$ARCH/Release \ Index: Makefile =================================================================== --- Makefile (revision 1924) +++ Makefile (working copy) @@ -257,7 +257,7 @@ $(Q)if [ "$(ARCHES)" != "source" ] ; then \ for ARCH in $(ARCHES); do \ echo "Apt-get is updating its files ..."; \ - ARCH=$$ARCH $(apt) update; \ + #ARCH=$$ARCH $(apt) update; \ done; \ fi