Commit b3070631 authored by Mike Gabriel's avatar Mike Gabriel

bin/gen-DSA: Fix package removal from the needed_file. Don't remove packages...

bin/gen-DSA: Fix package removal from the needed_file. Don't remove packages starting with the same string as the to be removed package.

Before this patch (spice was to be removed, spice-gtk got removed, too).

```
diff --git a/data/dla-needed.txt b/data/dla-needed.txt
index 106dbb0477..a8e6526c01 100644
--- a/data/dla-needed.txt
+++ b/data/dla-needed.txt
@@ -99,12 +99,6 @@ qemu (Santiago)
 --
 samba (Holger Levsen)
 --
-spice (Mike Gabriel)
-  NOTE: 20180819: Patch is possibly incomplete. See http://www.openwall.com/lists/oss-security/2018/08/17/2 (Brian May)
---
-spice-gtk (Mike Gabriel)
-  NOTE: 20180819: Patch is possibly incomplete. See http://www.openwall.com/lists/oss-security/2018/08/17/2 (Brian May)
---
 suricata (Thorsten Alteholz)
 --
 symfony (Thorsten Alteholz)
```

With this patch (only spice gets removed, spice-gtk stays):

```
diff --git a/data/dla-needed.txt b/data/dla-needed.txt
index 106dbb0477..c7a975a471 100644
--- a/data/dla-needed.txt
+++ b/data/dla-needed.txt
@@ -99,9 +99,6 @@ qemu (Santiago)
 --
 samba (Holger Levsen)
 --
-spice (Mike Gabriel)
-  NOTE: 20180819: Patch is possibly incomplete. See http://www.openwall.com/lists/oss-security/2018/08/17/2 (Brian May)
---
 spice-gtk (Mike Gabriel)
   NOTE: 20180819: Patch is possibly incomplete. See http://www.openwall.com/lists/oss-security/2018/08/17/2 (Brian May)
 --
```
parent 710adf03
Pipeline #17963 passed with stage
in 1 minute and 35 seconds
......@@ -386,7 +386,7 @@ EOF
cat $daid_entry data/$IDMODE/list > $tmp_list
cat $tmp_list > data/$IDMODE/list
rm -f $tmp_list
sed -rn '/^'"$PACKAGE"'\b/{: next;n;/^\s/b next;d};p' $needed_file > $needed_file.new
sed -rn '/^'"$PACKAGE"'(\s.*|$)\b/{: next;n;/^\s/b next;d};p' $needed_file > $needed_file.new
mv $needed_file.new $needed_file
echo "$IDMODE text written to ./$IDMODE-$DAID"
if [ "$IDMODE" = "DLA" ] || [ "$IDMODE" = "ELA" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment