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

running build-platform locally deleted a bunch of stuff #128

Open
jepler opened this issue Apr 12, 2022 · 1 comment
Open

running build-platform locally deleted a bunch of stuff #128

jepler opened this issue Apr 12, 2022 · 1 comment

Comments

@jepler
Copy link
Member

jepler commented Apr 12, 2022

I was trying to test #127 locally and it deleted the whole git repo where I was working. Nothing was lost as I didn't have any un-pushed work, but, OUCH.

I'm guessing it was because one step was arduino-cli uninstall "Adafruit Floppy", the library I was working inside of at the time.

jepler@eric:~/src/Adafruit_Floppy$ python3 ci/build_platform.py  feather_m4_express_tinyusb
build dir: /home/jepler/src/Adafruit_Floppy

########################################
INSTALLING ARDUINO BOARDS
########################################
arduino-cli core update-index --additional-urls https://adafruit.github.io/arduino-board-index/package_adafruit_index.json,http://arduino.esp8266.com/stable/package_esp8266com_index.json,https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json,https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json,https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json,http://drazzy.com/package_drazzy.com_index.json > /dev/null

Installing Adafruit BusIO
arduino-cli lib install "Adafruit BusIO" > /dev/null
Installing SdFat - Adafruit Fork
arduino-cli lib install "SdFat - Adafruit Fork" > /dev/null
arduino-cli lib uninstall "Adafruit Floppy"
Uninstalling [email protected]...


A new release of Arduino CLI is available: 0.21.0 → 0.21.1
https://arduino.github.io/arduino-cli/latest/installation/#latest-packages
Libraries installed:  ['/home/jepler/Arduino/libraries/Adafruit_ImageReader_Library', '/home/jepler/Arduino/libraries/Adafruit_SSD1306', '/home/jepler/Arduino/libraries/FlashStorage', '/home/jepler/Arduino/libraries/Adafruit_Unified_Sensor', '/home/jepler/Arduino/libraries/readme.txt', '/home/jepler/Arduino/libraries/Adafruit_seesawPeripheral', '/home/jepler/Arduino/libraries/SdFat_-_Adafruit_Fork', '/home/jepler/Arduino/libraries/Adafruit_WavePlayer_Library', '/home/jepler/Arduino/libraries/Adafruit_BusIO', '/home/jepler/Arduino/libraries/Adafruit_Arcada_Library', '/home/jepler/Arduino/libraries/Adafruit_GFX_Library', '/home/jepler/Arduino/libraries/Adafruit_NeoPixel', '/home/jepler/Arduino/libraries/Adafruit_Floppy', '/home/jepler/Arduino/libraries/arduino-CAN', '/home/jepler/Arduino/libraries/Adafruit_LED_Backpack_Library', '/home/jepler/Arduino/libraries/Adafruit_LIS3DH', '/home/jepler/Arduino/libraries/Servo', '/home/jepler/Arduino/libraries/CircularBuffer', '/home/jepler/Arduino/libraries/Adafruit_PixelDust', '/home/jepler/Arduino/libraries/Adafruit_SPIFlash', '/home/jepler/Arduino/libraries/Adafruit_Circuit_Playground', '/home/jepler/Arduino/libraries/Adafruit_ILI9341', '/home/jepler/Arduino/libraries/Adafruit_LIS3MDL', '/home/jepler/Arduino/libraries/Adafruit_Protomatter', '/home/jepler/Arduino/libraries/Adafruit_TouchScreen', '/home/jepler/Arduino/libraries/Adafruit_SleepyDog_Library', '/home/jepler/Arduino/libraries/Adafruit_Zero_DMA_Library', '/home/jepler/Arduino/libraries/Adafruit_STMPE610', '/home/jepler/Arduino/libraries/Adafruit_SSD1351_library', '/home/jepler/Arduino/libraries/Adafruit_ADT7410_Library', '/home/jepler/Arduino/libraries/Adafruit_OV7670', '/home/jepler/Arduino/libraries/SdFat', '/home/jepler/Arduino/libraries/Adafruit_MSA301', '/home/jepler/Arduino/libraries/TinyWireM', '/home/jepler/Arduino/libraries/Adafruit_seesaw_Library', '/home/jepler/Arduino/libraries/ArduinoJson', '/home/jepler/Arduino/libraries/Adafruit_SHARP_Memory_Display', '/home/jepler/Arduino/libraries/Adafruit_ST7735_and_ST7789_Library', '/home/jepler/Arduino/libraries/Adafruit_BMP280_Library', '/home/jepler/Arduino/libraries/Adafruit_FreeTouch_Library', '/home/jepler/Arduino/libraries/Adafruit_APDS9960_Library', '/home/jepler/Arduino/libraries/Adafruit_MLX90640', '/home/jepler/Arduino/libraries/Adafruit_GPS_Library', '/home/jepler/Arduino/libraries/Adafruit_ZeroTimer_Library', '/home/jepler/Arduino/libraries/Adafruit_InternalFlash', '/home/jepler/Arduino/libraries/Adafruit_TinyUSB_Library', '/home/jepler/Arduino/libraries/Adafruit_SHT31_Library', '/home/jepler/Arduino/libraries/NeoGPS', '/home/jepler/Arduino/libraries/Adafruit_EPD', '/home/jepler/Arduino/libraries/Adafruit_Zero_PDM_Library', '/home/jepler/Arduino/libraries/SD', '/home/jepler/Arduino/libraries/Adafruit_ZeroCAN', '/home/jepler/Arduino/libraries/Adafruit_HX8357_Library', '/home/jepler/Arduino/libraries/Adafruit_Arcada_GifDecoder', '/home/jepler/Arduino/libraries/Adafruit_Zero_FFT_Library', '/home/jepler/Arduino/libraries/Audio_-_Adafruit_Fork', '/home/jepler/Arduino/libraries/Arduino_MP3', '/home/jepler/Arduino/libraries/Adafruit_LSM6DS', '/home/jepler/Arduino/libraries/Adafruit_SSD1331_OLED_Driver_Library_for_Arduino', '/home/jepler/Arduino/libraries/MIDI_Library', '/home/jepler/Arduino/libraries/RTClib', '/home/jepler/Arduino/libraries/WaveHC']
################################################################################
SWITCHING TO adafruit:samd:adafruit_feather_m4:speed=120,usbstack=tinyusb
sh: 0: getcwd() failed: No such file or directory
Installing adafruit:samd ✓
sh: 0: getcwd() failed: No such file or directory
adafruit:samd        1.7.10    1.7.10 Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards
################################################################################
Traceback (most recent call last):
  File "/home/jepler/src/Adafruit_Floppy/ci/build_platform.py", line 517, in <module>
  File "/home/jepler/src/Adafruit_Floppy/ci/build_platform.py", line 396, in test_examples_in_folder
FileNotFoundError: [Errno 2] No such file or directory: '/home/jepler/src/Adafruit_Floppy/examples'
jepler@eric:~/src/Adafruit_Floppy$ ls examples
ls: cannot access 'examples': No such file or directory
jepler@eric:~/src/Adafruit_Floppy$ ls -al
total 0
@jepler jepler changed the title running locally deleted a bunch of stuff running build-platform locally deleted a bunch of stuff Apr 12, 2022
@caternuson
Copy link
Contributor

Here's the section of code that did that:

# Delete the existing library if we somehow downloaded
# due to dependencies
if our_name:
run_or_die("arduino-cli lib uninstall \""+our_name+"\"", "Could not uninstall")

Ideally, that should have only messed with stuff in /home/jepler/Arduino/libraries/, since it's invoking the removal via arduino-cli. Running locally has different behavior? I think maybe best to not use these scripts locally. They're meant to be run in a CI context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants