X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Fscripts%2Fvserver-build.functions.apt;h=ae0a9932dd4963f8d9812b540c2e403b10e57317;hb=95cf3519da76f335389cd7a18d0090b59f81f2e7;hp=30774e6af4de680fb9ac58a7b0da251d55c822b4;hpb=dfe1b38c6188bf170e9268de16713b956ad0d738;p=util-vserver.git diff --git a/util-vserver/scripts/vserver-build.functions.apt b/util-vserver/scripts/vserver-build.functions.apt index 30774e6..ae0a993 100644 --- a/util-vserver/scripts/vserver-build.functions.apt +++ b/util-vserver/scripts/vserver-build.functions.apt @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -function installBasePackages +function apt.installBasePackages { local name="$1" local dir="$2" @@ -40,13 +40,27 @@ function installBasePackages done } -function initVariablesApt +function apt.initVariables { + findFile APTCONFDEFAULT \ + "$CONFDIR/.distributions/$DISTRIBUTION/apt.conf" \ + "$CONFDIR/.defaults/apps/pkgmgmt/apt.conf" \ + "$DISTRIBDIR/$DISTRIBUTION/apt.conf" \ + "$DISTRIBDIR/defaults/apt.conf" \ + '' + + findFile APTVENDORDEFAULT \ + "$CONFDIR/.distributions/$DISTRIBUTION/vendor.conf" \ + "$CONFDIR/.defaults/apps/pkgmgmt/vendor.conf" \ + /etc/apt/vendors.list \ + "$DISTRIBDIR/$DISTRIBUTION/vendor.conf" \ + "$DISTRIBDIR/defaults/vendor.conf" \ + '' } -function initFilesystemApt +function apt.initFilesystem { - mkdir -p "$PKGCFGDIR"/apt/{etc,archives/partial,cache,state/lists/partial} + mkdir -p "$PKGCFGDIR"/apt/{etc/sources.list.d,etc/vendors.list.d,etc/apt.conf.d,archives/partial,cache,state/lists/partial} populateDirectory "$PKGCFGDIR/apt/etc" \ "$DISTRIBDIR/defaults/apt" \ @@ -59,4 +73,10 @@ function initFilesystemApt cmp -s "$f" "$f.tmp" || cat "$f.tmp" >"$f" rm -f "$f.tmp" fi + + test -z "$APTCONFDEFAULT" || \ + ln -s "$APTCONFDEFAULT" "$PKGCFGDIR"/apt/etc/apt.conf.d/default.conf + + test -z "$APTVENDORDEFAULT" || \ + ln -s "$APTVENDORDEFAULT" "$PKGCFGDIR"/apt/etc/vendors.list.d/default.conf }