tags -1 + fixed pending

I'd committed the patch in git repo use the attachment patch.

This patch add the package info come from oldstable and stable.

Debian-reference will get the package info from oldstable, stable, sid now.

在 2020/10/21 下午5:36, Holger Wansing 写道:
> We talk about experienced users here, but if such users are unable
> to find old versions of the debian-reference in the archive, they  should
> better not mix up stable and oldstable (and therefore risk to break
> the next dist-upgrade and similar), since they are *not* experienced users, 
> but - ok, I will stop that here.
>
> Holger 
>
-- 
肖盛文 xiao sheng wen Faris Xiao 
微信(wechat):atzlinux
《铜豌豆 Linux》 
基于 Debian 的 Linux 中文桌面操作系统:https://www.atzlinux.com
Debian QA page: https://qa.debian.org/developer.php?login=atzlinux%40sina.com
GnuPG Public Key: 0x339240CB

diff --git a/Makefile b/Makefile
index fef2588..cbbb89c 100644
--- a/Makefile
+++ b/Makefile
@@ -73,6 +73,8 @@ CODE	:=	sid
 ARCH	:=	amd64
 UDEBA	:=	$(DEBM)/$(CODE)
 UDEBB	:=	$(DEBM)/experimental
+UDEBC	:=	$(DEBM)/stable
+UDEBD	:=	$(DEBM)/oldstable
 DR_VERSION :=	$(shell dpkg-parsechangelog --show-field Version)
 
 # AsciiDoc source file names in $(DASC) directories for local update
@@ -152,6 +154,25 @@ packages.bkup.txt:
 	grep-dctrl -e -sPackage,Installed-Size -P "." packages.bkup.tmp > packages.bkup.txt
 	rm packages.bkup.tmp
 
+packages.stable.txt:
+	# FETCH PACKAGE (stable main)
+	@$(call check-command, wget, wget)
+	@$(call check-command, grep-dctrl, dctrl-tools)
+	wget -O - $(UDEBC)/main/binary-$(ARCH)/Packages.xz      | xzcat - > packages.stable.tmp
+	grep-dctrl -e -sPackage,Installed-Size -P "." packages.stable.tmp > packages.stable.txt
+	rm packages.stable.tmp
+
+packages.oldstable.txt:
+	# FETCH PACKAGE (oldstable main contrib)
+	@$(call check-command, wget, wget)
+	@$(call check-command, grep-dctrl, dctrl-tools)
+	wget -O - $(UDEBD)/main/binary-$(ARCH)/Packages.xz      | xzcat - > packages.oldstable.tmp
+	grep-dctrl -e -sPackage,Installed-Size -P "." packages.oldstable.tmp > packages.oldstable.txt
+	rm packages.oldstable.tmp
+	wget -O - $(UDEBD)/contrib/binary-$(ARCH)/Packages.xz      | xzcat - > packages.oldstable.tmp
+	grep-dctrl -e -sPackage,Installed-Size -P "." packages.oldstable.tmp >> packages.oldstable.txt
+	rm packages.oldstable.tmp
+
 all-popcon-results.txt:
 	# POPCON RESULTS
 	wget -O - $(UPOPC) | zcat - > all-popcon-results.txt
@@ -220,9 +241,9 @@ popcon.ent: all-popcon-results.txt all-popcon-pkgs.txt all-popcon-submissions.tx
 	echo "<!ENTITY pop-packages \"$$(grep -e '^Package:' all-popcon-pkgs.txt | wc -l)\">"				>> popcon.ent
 	grep -e '^Package:' all-popcon-pkgs.txt | grep -f pkg.lst | $(DBIN)/popconent `cat all-popcon-submissions.txt`	>> popcon.ent
 
-pkgsize.ent: pkg.lst packages.txt packages.bkup.txt
+pkgsize.ent: pkg.lst packages.txt packages.bkup.txt packages.stable.txt packages.oldstable.txt
 	# GENERATE pkgsize.ent
-	sort pkg.lst | uniq | $(DBIN)/sizeent packages.txt packages.bkup.txt	> pkgsize.ent
+	sort pkg.lst | uniq | $(DBIN)/sizeent packages.txt packages.bkup.txt packages.stable.txt packages.oldstable.txt > pkgsize.ent
 
 	# POPCON
 	wget -O - $(UPOPC) | zcat - > all-popcon-results.txt
diff --git a/bin/sizeent b/bin/sizeent
index 795f7aa..3ebe922 100755
--- a/bin/sizeent
+++ b/bin/sizeent
@@ -12,6 +12,8 @@ set -e
 #<xsl:variable name="lletters">abcdefghijklmnopqrstuvwxyzabcdefghij</xsl:variable>
 packages=$1
 bkups=$2
+stablepackages=$3
+oldstablepackages=$4
 while read X ; do
   #echo "process: $X" >&2
   echo -n "." >&2
@@ -23,6 +25,12 @@ while read X ; do
   elif SIZE=$(grep-dctrl -e -n --field=Package --show-field=Installed-Size  \
                     --pattern="^$(echo $X|sed -e 's/\+/\\+/g')\$" $bkups ) ; then
     echo "<!ENTITY size-${PKG} \"${SIZE}(*)\">"
+  elif SIZE=$(grep-dctrl -e -n --field=Package --show-field=Installed-Size  \
+                    --pattern="^$(echo $X|sed -e 's/\+/\\+/g')\$" $stablepackages ) ; then
+    echo "<!ENTITY size-${PKG} \"${SIZE}\">"
+  elif SIZE=$(grep-dctrl -e -n --field=Package --show-field=Installed-Size  \
+                    --pattern="^$(echo $X|sed -e 's/\+/\\+/g')\$" $oldstablepackages ) ; then
+    echo "<!ENTITY size-${PKG} \"${SIZE}\">"
   else
     echo "<!ENTITY size-${PKG} \"NOT_FOUND\">"
     echo  "" >&2

Attachment: OpenPGP_0x00186602339240CB.asc
Description: application/pgp-keys

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to