Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete still broken after 2c541b50 #40

Closed
cslauritsen opened this issue May 27, 2021 · 4 comments
Closed

Delete still broken after 2c541b50 #40

cslauritsen opened this issue May 27, 2021 · 4 comments
Assignees
Labels
bug Something isn't working priority-medium
Milestone

Comments

@cslauritsen
Copy link

cslauritsen commented May 27, 2021

Expected

After adding a printer named fred, running lprint delete -d fred afterward lprint printers should not show the printer fred.

Actual

lprint delete -d fred gives an error message, and the printer fred remains visible with lprint printers.

Reproduce Steps

Build pappl and lprint using branch fix-delete in my fork

tmp=$(mktemp -d /tmp/lprint.XXX)
mkdir $tmp
cd $tmp
git clone -b fix-delete https://github.com/cslauritsen/lprint
git clone https://github.com/cslauritsen/pappl

cat <<'%' > Dockerfile
FROM ubuntu:20.04 as builder

ENV TZ=America/New_York
RUN apt-get update -y

RUN ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata
RUN apt-get install -y libcups2-dev
RUN apt-get install -y libavahi-client-dev
RUN apt-get install -y gcc
RUN apt-get install -y make
RUN apt-get install -y tar
RUN apt-get install -y libusb-1.0-0-dev

RUN mkdir -p /build
RUN chown nobody /build
RUN apt-get install -y libpng-dev
RUN apt-get install -y libjpeg-dev
RUN apt-get install -y libpam0g-dev
RUN apt-get install -y libavahi-client-dev
RUN apt-get install -y avahi-daemon
RUN apt-get install -y libgnutls28-dev

WORKDIR /build
COPY pappl pappl
WORKDIR /build/pappl
RUN ./configure
RUN make all 
RUN make install

WORKDIR /build
COPY lprint lprint
WORKDIR /build/lprint
RUN ./configure
RUN make all 
RUN make install

FROM ubuntu:20.04 as runtime
RUN apt-get update -y \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y \
        tzdata \
        libpng-tools \
        libjpeg8 \
        libpam0g \
        libavahi-client3 \
        libgnutls30 \
        libcups2 \
        libusb-1.0-0 \
    && apt-get clean all
COPY --from=builder /usr/local /usr/local
ENV LD_LIBRARY_PATH=/usr/local/lib
%

docker build -t deleteme .
docker run --rm -d --name=lprint deleteme lprint server
docker exec -ti lprint bash
# run inside the container bash shell
lprint add -v usb://dev/null -m zpl_4inch-203dpi-dt -d fred
lprint printers
lprint delete -d fred # >> lprint: Unable to get information for 'fred' - successful-ok
lprint printers # >> fred
exit
# back to host shell
docker rm -f lprint
docker rmi lprint

image

@michaelrsweet
Copy link
Owner

Um, don't you want to use:

lprint delete -d fred

since "fred" is the name of the printer?

@michaelrsweet michaelrsweet self-assigned this Jun 7, 2021
@michaelrsweet michaelrsweet added the investigating Investigating the issue label Jun 7, 2021
@cslauritsen
Copy link
Author

cslauritsen commented Jun 7, 2021 via email

@cslauritsen
Copy link
Author

I re-ran my repro steps & updated the screenshot.

@michaelrsweet michaelrsweet added this to the v1.1.x milestone Sep 28, 2021
@michaelrsweet michaelrsweet added bug Something isn't working priority-medium and removed investigating Investigating the issue labels Dec 17, 2021
@michaelrsweet
Copy link
Owner

@cslauritsen This seems to be fixed in the latest code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-medium
Projects
None yet
Development

No branches or pull requests

2 participants