Bug 12944 - location export: 'IpsetOutputWriter' object has no attribute 'tag'
Summary: location export: 'IpsetOutputWriter' object has no attribute 'tag'
Status: CLOSED FIXED
Alias: None
Product: Location Database
Classification: Unclassified
Component: libloc (show other bugs)
Version: unspecified
Hardware: unspecified Unspecified
: - Unknown - Major Usability
Assignee: Michael Tremer
QA Contact: Peter Müller
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-02 13:19 UTC by Peter Müller
Modified: 2022-10-29 13:37 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Müller 2022-10-02 13:19:15 UTC
While trying to update libloc to 0.9.15 in IPFire 2.x:

libloc (0.9.15)                                                                                                                                                                                                          [       15 ][ FAIL ]

    /usr/bin/install -c -m 644 $lang.gmo.m $dir/libloc.mo.m; \
    echo "installing $lang.gmo.m as $dir/libloc.mo.m"; \
    else \
    if test -r ./$lang.gmo.m ; then \
    /usr/bin/install -c -m 644 ./$lang.gmo.m \
    $dir/libloc.mo.m; \
    echo "installing ./$lang.gmo.m as" \
    "$dir/libloc.mo.m"; \
    else \
    true; \
    fi; \
    fi; \
    done
    installing de.gmo as /usr/share/locale/de/LC_MESSAGES/libloc.mo
    make[1]: Leaving directory '/usr/src/libloc-0.9.15'
    # Copy database to correct location.
    cd /usr/src/libloc-0.9.15 && cp -avf /usr/src/cache/location-2022-09-26.db.xz /var/lib/location/database.db.xz
    '/usr/src/cache/location-2022-09-26.db.xz' -> '/var/lib/location/database.db.xz'
    # Uncompress database.
    cd /usr/src/libloc-0.9.15 && rm -f /var/lib/location/database.db
    cd /usr/src/libloc-0.9.15 && xz -d /var/lib/location/database.db.xz
    # Create directory for ipset databases.
    cd /usr/src/libloc-0.9.15 && mkdir -pv /var/lib/location/ipset
    # Launch location util and export all locations in ipset compatible format.
    cd /usr/src/libloc-0.9.15 && /usr/bin/location export \
    --directory=/var/lib/location/ipset \
    --family=ipv4 \
    --format=ipset
    'IpsetOutputWriter' object has no attribute 'tag'
    make: *** [libloc:94: /usr/src/log/libloc-0.9.15] Error 1

The error does not occur if "--directory=x" is omitted, however, this is required for IPFire, since we need these ipset files to be exported to a certain directory.
Comment 1 Michael Tremer 2022-10-04 08:47:52 UTC
http://git.ipfire.org/?p=people/ms/libloc.git;a=commit;h=cd214f295797e5cc8dbc296753924863b33ab8bd

Author: Michael Tremer <michael.tremer@ipfire.org>

export: Fix generating file names for ipset output

The tag that is being used in the filename was set after creating the
filename. The order has now been fixed and the export works fine for me.

Fixes: #12944
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Comment 2 Michael Tremer 2022-10-29 13:37:41 UTC
libloc 0.9.16 has been released:

> https://lists.ipfire.org/pipermail/location/2022-October/000602.html